@echo off
CALL checkDataSize
HEX2BIN /Q /L262144 obj\TSUM.H00 obj\TSUM56.BIN
HEX2BIN /Q /O65536 /M obj\TSUM.H01 obj\TSUM56.BIN
HEX2BIN /Q /O131072 /M obj\TSUM.H02 obj\TSUM56.BIN
HEX2BIN /Q /O196608 /M obj\TSUM.H03 obj\TSUM56.BIN


MD BIN
DEL /Q/S BIN\*.*
COPY Checksum.exe BIN\
COPY BINTRIM.exe BIN\
Copy MST_HDCP_KEY_OTS.BIN BIN\
Copy %2_DP_EDID.BIN BIN\
cd obj
copy "TSUM56.BIN" ..\bin
DEL "TSUM56.*"
cd..
cd bin
BINTRIM /S0	/L237568	TSUM56.BIN	%1_REDUCE24K.BIN
BINTRIM /S0	/L239872	TSUM56.BIN	%1_REDUCE22K.BIN
Copy /B %1_REDUCE24K.BIN+MST_HDCP_KEY_OTS.BIN+%2_DP_EDID.BIN %1_HDCP_EDID.BIN
Copy /B %1_REDUCE22K.BIN+%2_DP_EDID.BIN %1_DP_EDID.BIN
COPY "TSUM56.BIN" %1.bin

Checksum %1.bin /b
del Checksum.exe
del BINTRIM.exe
del "TSUM56.*"
del %2_DP_EDID.BIN
del MST_HDCP_KEY_OTS.BIN
del %1_REDUCE22K.BIN

Pause